package edu.suda.xsap.dto.convert;

import edu.suda.xsap.dto.MemberBindRecordDto;
import edu.suda.xsap.entity.MemberBindRecord;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface MemberBindRecordConvert {

    @Mapping(source="id", target = "id")
    @Mapping(source="memberId", target = "memberId")
    @Mapping(source="cardId", target = "cardId")
    @Mapping(source="validCount", target = "validCount")
    @Mapping(source="validDay", target = "validDay")
    @Mapping(source="receivedMoney", target = "receivedMoney")
    @Mapping(source="payMode", target = "payMode")
    @Mapping(source="note", target = "note")
    @Mapping(source="activeStatus", target = "activeStatus")
    @Mapping(source="createTime", target = "createTime")
    @Mapping(source="lastModifyTime", target = "lastModifyTime")
    @Mapping(source="version", target = "version")

    MemberBindRecordDto toDto(MemberBindRecord memberBindRecord);
    List<MemberBindRecordDto> toDtoList(List<MemberBindRecord> memberBindRecord);

    MemberBindRecord toEntity(MemberBindRecordDto memberBindRecordDto);
    List<MemberBindRecord> toEntityList(List<MemberBindRecordDto> memberBindRecordDto);

}
